//
//  LoginUntil.swift
//  XGamesLive
//
//  Created by ios on 2024/5/14.
//

import UIKit
import Foundation


class LoginUntil {
    
    static func creatLoginIconView()->UIImageView{
        let iconView = UIImageView(image: imageWithName("icon_xgl_appicon")).then { make in
            make.backgroundColor = .clear
            make.layerCornerRadius = 18.0
            make.clipsToBounds = true
        }
        return iconView
    }
    
    static func creatLoginInputView(title: String,inputText: UITextField) -> UIView{
        let view = UIView()
        
        let titleText = UILabel().then { make in
            make.text = title
            make.textColor = UIColor.white
            make.font = UIFont.pingfangSC_Regular(fontSize: 14.0)
        }
        
        let inputContentView = UIView().then { make in
            make.backgroundColor = UIColor.hexColor("#001310")
            make.layerCornerRadius = 12.0
        }
        
        inputContentView.addSubview(inputText)
        view.addSubviews([titleText,inputContentView])
        
        inputText.snp.makeConstraints { make in
            make.center.height.equalToSuperview()
            make.left.equalTo(15.0)
        }
        titleText.snp.makeConstraints { make in
            make.left.top.equalToSuperview()
        }
        inputContentView.snp.makeConstraints { make in
            make.left.centerX.equalToSuperview()
            make.top.equalTo(titleText.snp.bottom).offset(15.0)
            make.height.equalTo(59.0)
        }
        view.snp.makeConstraints { make in
            make.bottom.equalTo(inputContentView)
        }
        
        return view
    }

}


class LoginInfor {
    static let share: LoginInfor = LoginInfor()
    
    var infor: LoginData?
}
